package com.ztgf.sys.api.client;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.ztgf.common.constant.Result;
import com.ztgf.common.enums.CodeEnum;
import com.ztgf.message.model.service.IKafkaProducerService;
import com.ztgf.sys.models.vo.SysInstitutionVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.*;
import com.ztgf.sys.models.service.ISysInstitutionService;
import com.ztgf.sys.models.bo.SysInstitutionBO;
import com.ztgf.sys.models.dto.SysInstitutionDTO;

import java.util.List;

/**
 * 制度表控制器
 *
 * @author YUE
 * @Date 2020-07-04 17:58:52
 */

@RestController
@RequestMapping("/api/sysInstitution")
@Slf4j
@Api(value = "SysInstitutionApiController",tags = "制度表Api接口")
public class SysInstitutionApiController {

    @DubboReference
    private ISysInstitutionService sysInstitutionService;

    /**
     * 获取首页的所有信息
     * @return
     */
    @ApiOperation(value = "制度表首页",notes = "制度表首页")
    @PostMapping("/getListHomeInfo")
    public Result<List<SysInstitutionVO>> getListHomeInfo(){
        return sysInstitutionService.getTreeListHomeInfo();
    }
}
